﻿using UnityEngine;

[System.Serializable]
public class Config
{
    public float playerSpeed;
    public int maxHealth;
}

public class ConfigLoader : MonoBehaviour
{
    public TextAsset configFile;

    void Start()
    {
        Config config = JsonUtility.FromJson<Config>(configFile.text);
        Debug.Log("Player Speed: " + config.playerSpeed);
        Debug.Log("Max Health: " + config.maxHealth);
    }
}